﻿using AppService.IService.ICargo_mentSrevice;
using Domain.Entity.Basic_information;
using Domain.IRepository.ICargo_mentRepository;
using Domain.IRepository.System_Carrier_ment;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;

namespace AppService.Service.Cargo_mentSrevice
{
    [Dependency(ServiceLifetime.Scoped)]
    public class Cargo_mentSrevice : ICargo_mentSrevice
    {
        public Cargo_mentSrevice(ICargo_mentRepository cargo_MentRepository)
        {
            Cargo_MentRepository = cargo_MentRepository;
        }
        public ICargo_mentRepository Cargo_MentRepository { get; set; }

        public int Count(string time, string Cg_name)
        {
            return Cargo_MentRepository.Count(time, Cg_name);
        }

        public bool Delete(int Cg_id)
        {
            return Cargo_MentRepository.Delete(Cg_id) > 0;
        }

        public List<Cargo_ment> GetCargo_ment_time(string time, string Cg_name, int currentPage, int PageSize)
        {
            return Cargo_MentRepository.GetCargo_ment_time(time, Cg_name, currentPage, PageSize);
        }

        public List<Cargo_ment> GetCargo_s(int currentPage, int PageSize)
        {
            return Cargo_MentRepository.GetCargo_s(currentPage, PageSize);
        }

        public bool Add(Cargo_ment cargo_Ment)
        {
            return Cargo_MentRepository.Add(cargo_Ment) > 0;
        }

        public List<Cargo_ment> GetCargo_Ments_id(int Cg_id)
        {
            return Cargo_MentRepository.GetCargo_Ments_id(Cg_id);
        }

        public bool Update(Cargo_ment cargo_ment)
        {
            return Cargo_MentRepository.Update(cargo_ment) > 0;
        }

    }
}
